﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Hexa.QuestionEngine.Domain
{
    [Serializable]
    public class SurveyQuestionType
    {
        /// <summary>
        /// Gets or sets the id.
        /// </summary>
        /// <value>
        /// The id.
        /// </value>
        public virtual int Id { get; protected set; }

        /// <summary>
        /// Gets or sets the Name.
        /// </summary>
        /// <value>
        /// The Name.
        /// </value>
        public virtual string Name { get; set; }

        // <summary>
        /// Initializes a new instance of the <see cref="SurveyQuestionType"/> class.
        /// </summary>
        /// <param name="id">The id.</param>
        /// <param name="name">The name.</param>
        public SurveyQuestionType(int id, string name)
        {
            this.Id = id;
            this.Name = name;
        }
    }

    /// <summary>
    /// class Genders of Read Only Collection.
    /// </summary>
    [Serializable]
    public class SurveyQuestionTypes : System.Collections.ObjectModel.ReadOnlyCollection<SurveyQuestionType>
    {
        /// <summary>
        /// Allows Values traslate  of Genders.
        /// </summary>
        /// <param name="text">The text.</param>
        /// <returns></returns>
        public static string _(string text)
        {
            return GNU.Gettext.GettextHelper.t(text);
        }

        /// <summary>
        /// add a records to the collection
        /// </summary>
        public static SurveyQuestionType SingleChoice = new SurveyQuestionType(1, "SingleChoice");
        public static SurveyQuestionType MultiChoiceVariable = new SurveyQuestionType(2, "MultiChoiceVariable");
        public static SurveyQuestionType MultiChoiceFixed = new SurveyQuestionType(3, "MultiChoiceFixed");
        public static SurveyQuestionType OpenResponse = new SurveyQuestionType(4, "OpenResponse");
        public static SurveyQuestionType YesOrNo = new SurveyQuestionType(5, "YesOrNo");
        public static SurveyQuestionType ScaleValues = new SurveyQuestionType(6, "ScaleValues");

        /// <summary>
        /// Initializes a new instance of the <see cref="Genders"/> class.
        /// </summary>
        public SurveyQuestionTypes()
            : base(new[] { SingleChoice, MultiChoiceVariable, MultiChoiceFixed, OpenResponse, YesOrNo, ScaleValues })
        {
        }
    }
}
